/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-05-28     Dell       the first version
 */
#ifndef APPLICATIONS_UART_UART_H_
#define APPLICATIONS_UART_UART_H_


#include <rtthread.h>


/** 串口接收消息结构 **/
struct rx_msg
{
    rt_device_t dev;
    rt_size_t   size;
};


/** 串口设备句柄 **/
rt_device_t serial;

/** 消息队列控制块 **/
struct rt_messagequeue rx_mq;

/** 接收数据回调函数 **/
rt_err_t uart_input(rt_device_t dev, rt_size_t size);

/** uart 接收线程 **/
void serial_thread_entry(void);


#endif /* APPLICATIONS_UART_UART_H_ */
